class MyLogDecorator:
    def __init__(self, fun):
        self.fun = fun

    def __call__(self, *args, **kwargs):
        print(f'方法名为：{self.fun.__name__}')
        return self.fun(*args, **kwargs)


@MyLogDecorator
def fun():
    print('fun is running')


@MyLogDecorator
def fun2():
    print('fun2 is running')


fun()
fun2()
